#ifndef MEASUREPAGECHARTS2_H
#define MEASUREPAGECHARTS2_H
#include <QtCharts>
#include "qchart.h"
#include <QtCharts/QChartView>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCharts/QAbstractBarSeries>
#include <QtCharts/QPercentBarSeries>
#include <QtCharts/QStackedBarSeries>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QLegend>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QValueAxis>
#include <QtCharts/QChartGlobal>

class MeasurePageCharts2
{
public:
    MeasurePageCharts2();
    ~MeasurePageCharts2();
    QLineSeries *Series_PPG1,*Series_PPG2;
    QLineSeries *Series_APPG1,*Series_APPG2;
    QBarSet *HRVHist_BarSet1,*HRVHist_BarSet2;
    void InitialAxis_Chart_PPG1();
    QChart *CreateLineChart_PPG1();
    void Update_PPGData1(double ppgData);

    void InitialAxis_Chart_APPG1();
    QChart *CreateLineChart_APPG1();
    void Update_APPGData1(double appgData);

    void InitialAxis_Chart_HRV1();
    QChart *CreateHRVHistBarChart();
    void Update_HRVHistBarData(int pos,int RR);
private:
    int LineChartLen_X;
    int HRVBarNum;
    int barNumLoop;
    //    QLineSeries *Series_PPG1,*Series_PPG2;
    //    QLineSeries *Series_APPG1,*Series_APPG2;
    //    QBarSet *HRVHist_BarSet1,*HRVHist_BarSet2;
    QColor *Chart_Y_Axis_Line_Color;//y轴Axis颜色
    QFont *Font_Chart_LabelsFont,*Font_Chart_TitleFont;
    QValueAxis *xAxis_PPG1 = new QValueAxis();
    QValueAxis *yAxis_PPG1 = new QValueAxis();
    QValueAxis *xAxis_APPG1 = new QValueAxis();
    QValueAxis *yAxis_APPG1 = new QValueAxis();
    QValueAxis *xAxis_HRV1 = new QValueAxis();
    QValueAxis *yAxis_HRV1 = new QValueAxis();
    int ppg1_flag,ppg2_flag,app1_flag,appg2_flag;

    QBarSet *HRVHist_BarSet;

};

#endif // MEASUREPAGECHARTS2_H
